\documentclass[12pt,dvips,twosided]{article}
\usepackage{palatino,a4,graphicx,color,pifont,html}
\def\xfm{\emph{X File Explorer}}

\begin{document} 
\pagestyle{empty}
\setlength{\parskip}{.15in}
\vspace*{1cm}
\begin{center}
\Huge
Introduction for New Users\\
\vspace{1cm}
\Large
Cambridge University Engineering Department\\
Teaching Workstations\\
\vspace{0.5cm}
\large Roberto Cipolla, Richard Prager, Tim Love\\
July, 2005\\
\vspace{0.5cm}
\end{center}

\noindent\hbox{\vtop{\kern0pt\hsize=10cm \noindent This document describes how to log on to the teaching system and perform
simple file manipulation using \xfm{}. Common tasks
like printing, editing, getting help, accessing the World Wide Web and using 
e-mail are also addressed. An enhanced version of this document is 
online in the help system}
        \vtop{\kern0pt\hbox{\hspace{5mm}}}      
      \vtop{\kern0pt\hbox{\includegraphics[width=4cm]{myxfe.eps}}}}





\setlength{\parskip}{0mm}
{\small
\tableofcontents
}
\pagestyle{plain}
\setlength{\parskip}{0in}
\newpage
\section{Getting Started}

Here we describe how to log on and perform simple file
manipulation in the windowing environment.  Using this simple environment
you will be able to use the \texttt{Unix} operating system 
in a straightforward way.

This year there are 2 options when you login. This document describes
the
\textit{This Machine} set-up. The \textit{Server} set-up is described in a
separate
document.

\setlength{\parskip}{.15in}

To start with, the computer will present you with a login window.
If the screen is completely black then move the mouse slightly; this
will turn off the screen saver.  
\begin{dinglist}{43}
\item Make sure that \textit{This Machine} is highlighted.
\item Type your username (your \textit{CRS ID}) and press
the \texttt{Return} key.  If you don't
know your user identifier it can be found on the notice boards near the
door to the main computer room.  If in doubt ask a demonstrator or one
of the operators in the machine room at the west end of the DPO.

\item Type in your CUED password (\textit{not} your hermes password).  
First year students should
have chosen a password during registration at the start of term.  Other
students should use their old password.  When you type your
password it will not be echoed to the screen.  If you cannot remember
your password, or it does not work, ask one of the operators. \texttt{Unix} is
\textit{case sensitive}, so make sure that ``\texttt{Caps Lock}'' is not set.

If there are system announcements a yellow window will appear in the
bottom-right corner of the screen. Read the messages then press the
\verb|Return| key while the mouse pointer is in the yellow window. 
Once you have logged in successfully a text window will appear and
you will get a prompt something like:\newline
\texttt{tw400/ab123:}
\end{dinglist}

If you are doing a
practical you should now consult your main practical handout to see if
you are required to use a special command (like \texttt{`start camclay'} or
\texttt{`start 1AComputing'}). 

\setlength{\parskip}{0in}
\section{Icons \& files}
\subsection*{Your Home Folder}
Next, we are going to start \xfm{}. Click on the 
\includegraphics{start.eps} button at the bottom-left of the screen and choose
\texttt{X File Explorer}. The icons you initially see in this
\emph{Xfe} 
window represent files or
collections of files in the part of the file system that belongs to you.


\setlength{\parskip}{0in}
\subsection*{Creating a New File}

To create a new file, choose the \texttt{New File} option from the
\texttt{File} menu. Call the file \verb|sports|. 
\setlength{\parskip}{.15in}

When you come to name files yourself try to use only
letters and digits --- no spaces or punctuation characters
(except for full stops).  If you are used to using PCs it is also worth
noting that Unix distinguishes the case of characters in file names.
The file \texttt{Sports} is not the same file as \texttt{sports}.
\setlength{\parskip}{0in}
\subsection*{Copying Files}

\noindent\hbox{\vtop{\kern0pt\hsize=6cm \noindent To copy the \texttt{sports} file hold the
\texttt{Ctrl} button down while dragging the file elsewhere in the window.
You will be prompted to give the new file a name. The name starts with the folder's name. Append it with \texttt{/activities}
(note the '/' character) and  click on the \fbox{Accept} button. }
        \vtop{\kern0pt\hbox{\hspace{5mm}}}      
      \vtop{\kern0pt\hbox{\includegraphics[width=8cm]{copy.eps}}}}


\setlength{\parskip}{0in}
\subsection*{Deleting Files}

Make another copy of \texttt{sports} called \texttt{doomed}.  We will use
this file to practice deleting! First select the \texttt{doomed} file 
by clicking on it. Then  use the \texttt{Delete} menu item in the  
\texttt{File} menu. A new box will appear. Click on the 
\fbox{OK} option and the file will
disappear from your directory.

\setlength{\parskip}{0in}
\section{Folders}

\subsection*{Creating a New Folder}
 Imagine
that the \texttt{sports} file contains a list of the sports you like playing
 and
the \texttt{activities} file contains a list of all the other leisure
activities you enjoy.  They are rather out of place among all the other
files in your home directory which are currently mostly special user
configuration files.
\setlength{\parskip}{.15in}

It would be nice if you could create a separate place to put
\texttt{sports} and \texttt{activities}.  This is what a folder is for.
Folders (\textit{e.g.} your home folder) can contain files \textbf{and
other sub-folders}. 

Choose the \texttt{New Folder} option from the
\texttt{File} menu. Call the folder \verb|clump|. 
 Note how the icon of this folder looks different to ordinary file icons.

Double click on this new icon to open it out. You will see a folder just 
like your home folder, only almost empty. 
 There will be one icon present, called \texttt{`..'} (pronounced `dot dot').  This refers to the folder's parent, in this case
your home folder.

The underlying structure is that all the folders are arranged in a tree
and each one contains icons telling it:

\begin{itemize}
\item
The parent folder (they only have one parent).
This is the \texttt{`..'} icon.
\item
Which (if any) folders are its children.
\item
Which (if any) files it contains.
%\item
%There is also the \texttt{`.'} icon referring back to the directory itself.
\end{itemize}

Note that the full name of the folder you're now looking at is
shown near the top of the window.

Now double-click on the \texttt{`..'} icon. This will open out your home 
folder again because that is  \texttt{clump}'s parent.

\setlength{\parskip}{0in}
\subsection*{Moving \& Copying Between Folders}
Now we'll try moving the \texttt{sports} files into the \texttt{clump} 
directory. If you drag the \texttt{sports} icon onto the \texttt{clump} icon
 and click on the \texttt{Accept} button when
asked to confirm, your file will have moved into the folder. If you
want to \textit{copy} the file, leaving the original intact, then drag
while pressing down the \texttt{Ctrl} key.

You may need to use the \texttt{Refresh} option of the \texttt{File}
menu to update the window.


\setlength{\parskip}{0in}
\section{Window management}
When you have lots of windows you need to be able to manage them.
\begin{itemize}
\item \textit{Moving} - you can drag a window around using its title
bar.
\item \textit{Resizing} - you can drag a window's corner to resize it. 
\item \textit{Iconify} - if you click on the \fbox{\_} near the 
 top right hand corner of the folder window, it will tumble
 down into the task-bar at the bottom of the screen. The window can
 be restored by clicking on its name in the task-bar
\item \textit{Full Screen} - to fill the screen with the window, 
click on the \fbox{ } near the 
 top right hand corner of the directory window.
\item \textit{Kill} - clicking on the \fbox{x} box kills the window.
Using this risks losing your unsaved work. Try to use
the program's \texttt{Exit} option instead. 
\item \textit{The Screens Panel} - The Screens box at the bottom-right
  shows 
9 'virtual desktops'. All your windows
so far have appeared on one virtual desktop (top-left), but by clicking on another
virtual desktop you can start with an uncluttered screen. This facility helps
keep your workspace tidy. You can move windows from one 
virtual desktop to another by dragging the mini-window using the middle button.
\end{itemize}

Note that you might have to click on a window before the text that you 
type goes into it.

\setlength{\parskip}{0in}
\section{The Emacs Editor}

\subsection*{Starting the Editor}

Create a file called \texttt{pomodoro} in your home directory.
\setlength{\parskip}{.15in}

Now let's put something in the file.  Double-click with the left
mouse button on the \texttt{pomodoro} icon. When offered
\texttt{emacs},
accept it. In Emacs you will see the majority of the screen is used to display the
file you are editing.  Below this is a bar with something like

\begin{verbatim}
--:--   pomodoro      (Fundamental)--L1--ALL-------
\end{verbatim}

Beneath this there is a single line (the mini-buffer) for messages and editor commands.
Along the top of the window is a menu-bar and icons.

Type in several lines
of text (pressing the \texttt{Return} key at the end of each line).
The arrow keys, and Delete key will work though the NumPad keys won't
work until you press the \texttt{Num Lock} key.

There is an online tutorial for advanced emacs
users which is started from emacs' \texttt{Help} menu.
It is \textbf{not} recommended that you do this now.
Further details can be found in the \emph{Unix from the Command Line} handout.

\setlength{\parskip}{0in}
\subsection*{Emacs Menus and Scrollbars}

Across the top of the emacs window is a series of menus.  The \texttt{File} 
menu contains items that let you load and save files. Select  the 
\texttt{Open File...} option.
 A prompt will appear at the bottom of the window. If
you were to type the name of a file here you would be able to edit that
file.  We won't do this just now so go to the \texttt{Minibuf} menu
and select \texttt{Quit} to cancel the  operation.
 
\setlength{\parskip}{.15in}
Go back to the \texttt{File} menu and select the \texttt{Save Buffer} item.
This saves the file you are editing to disk.  
You must save files to disk before
you try to perform any operations on them outside the editor.

We'll try searching the text now.
  Place the text cursor at the top of the text in 
\texttt{pomodoro} and pull down the \texttt{Edit} menu so that you can select the
\texttt{Search} item from the\texttt{Search} submenu.  A prompt will appear.  Type in a
string you can see at some point in the file and press the \texttt{Return}
key. The editor will find the string and place the text cursor at the end of it.

  Make sure \texttt{pomodoro} is at least
five lines long and pull down the \texttt{Edit} menu. From the
\texttt{Go To} sub-menu pick the \texttt{Goto Line} item. When the 
prompt appears specify \texttt{5} and press the \texttt{Return}
key.  The cursor should move to the
fifth line of the file. Note that the line number is shown in the 
status line near the bottom of the window -- \texttt{L5}.

To copy some text, drag the mouse cursor over it using the left mouse
button. Then click with the middle mouse button where you want the
text to be copied. This facility also works between
most kinds of text windows. 
 
To delete a block of text, click once with the left mouse button at
one end, and twice with the right mouse button at the other (or
choose the \texttt{Cut} item in the \texttt{Edit} menu). If you want to
move the text elsewhere, just click on the location with the middle mouse 
button. 

If you want to move quickly around a document that is too
big to fit on one page, you can use the scrollbar on the left of the window
or the
\texttt{Page Up} and \texttt{Page Down} on the keyboard by the arrow keys. 

If you made an editing mistake you can use the \texttt{Undo} option in the
\texttt{Edit} menu repeatedly until you get back to the way you were. 

The \texttt{Exit Emacs} item in the \texttt{Files} menu makes the editor offer to 
save any files you have
changed during the current editing session, and then kills the editor
program.  A backup copy of each file you change is kept by the editor.
These are the files with names ending in the character \verb|`~'|.  Don't
worry if you cannot always see them in your directory window, you will
only need to use them if things go badly wrong.

Many of these actions can be performed using the icons under the
menu-bar. Experiment to find out what they do.

\includegraphics{bar.eps}

\setlength{\parskip}{.15in}
\section{Applications and logging off}
If you click on \includegraphics{start.eps} at the bottom-left of the
screen you can explore what programs we have. In particular there's

\noindent\textbf{Mozilla-Firefox} - a web browser. You can use it for webmail too. \emph{You will need to become familiar with the WWW}.

\noindent\hbox{\vtop{\kern0pt\hsize=6cm \noindent\textbf{Help} - a short-cut to CUED's help-on-the-web and list of
 \htmladdnormallink{\textit{Frequently Asked
     Questions}}{http://www-h.eng.cam.ac.uk/help/tpl/cuedfaq.html}. \emph{We expect you to become familiar with the help system}}
     \vtop{\kern0pt\hbox{\hspace{5mm}}}      
      \vtop{\kern0pt\hbox{\includegraphics[width=8cm]{help.eps}}}}

\noindent\hbox{\vtop{\kern0pt\hsize=6cm \noindent\textbf{Programs/CUED/Fast
      Feedback} - our Fast Feedback Facility. Your chance
to offer instant, anonymous feedback on teaching, computing, etc.}
        \vtop{\kern0pt\hbox{\hspace{5mm}}}      
      \vtop{\kern0pt\hbox{\includegraphics[width=8cm]{1bfff.eps}}}}

\noindent\textbf{Programs/CUED/Survey} - our under-graduate user survey.

\noindent\textbf{XTerminal} -  provides a terminal window on the screen. This
  can be used to execute Unix shell commands. These are
covered in the \textit{Unix from the command line} document.


\subsection*{Logging off}
To \textbf{Log Out}, use the \texttt{Log Out} item in the
\texttt{start}
menu.

\end{document}

